]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
theme: Include both dark and light variant in resource
authorFlorian Müllner <fmuellner@gnome.org>
Fri, 3 Jun 2022 14:15:38 +0000 (16:15 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Thu, 25 May 2023 15:10:53 +0000 (17:10 +0200)
This will allow us to switch between the variants according to
the color-scheme setting.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5545

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2324>

data/gnome-shell-theme.gresource.xml
data/theme/gnome-shell-dark.scss [new file with mode: 0644]
data/theme/gnome-shell-light.scss [new file with mode: 0644]
data/theme/gnome-shell.scss [deleted file]
data/theme/meson.build
js/ui/sessionMode.js
meson/generate-stylesheets.py

index 24b3be8dbb7fede4614da73c9aa77ebedfeb0831..8a4948e41ba7ce8eddd6dc62d1d0b0f24e28f136 100644 (file)
@@ -9,7 +9,8 @@
     <file>checkbox-off-focused.svg</file>
     <file>checkbox-off-light.svg</file>
     <file>checkbox-off.svg</file>
-    <file>gnome-shell.css</file>
+    <file>gnome-shell-dark.css</file>
+    <file>gnome-shell-light.css</file>
     <file>gnome-shell-high-contrast.css</file>
     <file>gnome-shell-start.svg</file>
     <file>pad-osd.css</file>
diff --git a/data/theme/gnome-shell-dark.scss b/data/theme/gnome-shell-dark.scss
new file mode 100644 (file)
index 0000000..8ee4999
--- /dev/null
@@ -0,0 +1,6 @@
+$variant: 'dark';
+
+@import "gnome-shell-sass/_colors"; //use gtk colors
+@import "gnome-shell-sass/_drawing";
+@import "gnome-shell-sass/_common";
+@import "gnome-shell-sass/_widgets";
diff --git a/data/theme/gnome-shell-light.scss b/data/theme/gnome-shell-light.scss
new file mode 100644 (file)
index 0000000..ae6fce7
--- /dev/null
@@ -0,0 +1,6 @@
+$variant: 'light';
+
+@import "gnome-shell-sass/_colors"; //use gtk colors
+@import "gnome-shell-sass/_drawing";
+@import "gnome-shell-sass/_common";
+@import "gnome-shell-sass/_widgets";
diff --git a/data/theme/gnome-shell.scss b/data/theme/gnome-shell.scss
deleted file mode 100644 (file)
index 8ee4999..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-$variant: 'dark';
-
-@import "gnome-shell-sass/_colors"; //use gtk colors
-@import "gnome-shell-sass/_drawing";
-@import "gnome-shell-sass/_common";
-@import "gnome-shell-sass/_widgets";
index b7cd5487b51e06ec6cd0eb705d349206ccd3bd19..0d28efd038181fa38f0639a8ce4607fdece77191 100644 (file)
@@ -1,6 +1,7 @@
 theme_sources = files([
   'gnome-shell-high-contrast.scss',
-  'gnome-shell.scss',
+  'gnome-shell-dark.scss',
+  'gnome-shell-light.scss',
   'gnome-shell-sass/_colors.scss',
   'gnome-shell-sass/_common.scss',
   'gnome-shell-sass/_drawing.scss',
@@ -43,7 +44,8 @@ theme_sources = files([
 
 stylesheets = [
   'gnome-shell-high-contrast.css',
-  'gnome-shell.css'
+  'gnome-shell-dark.css',
+  'gnome-shell-light.css',
 ]
 
 foreach stylesheet: stylesheets
index 8c8b6e4fc82a45c2a6061de2d25dd7ea951b8a72..83786a5c7aa93ae7b998ad6766fe8f011d607872 100644 (file)
@@ -22,7 +22,7 @@ if (Config.HAVE_NETWORKMANAGER)
 const _modes = {
     'restrictive': {
         parentMode: null,
-        stylesheetName: 'gnome-shell.css',
+        stylesheetName: 'gnome-shell-dark.css',
         themeResourceName: 'gnome-shell-theme.gresource',
         hasOverview: false,
         showCalendarEvents: false,
index bd6b641b8ec57441b54ddf4d4bea147b7f311de5..10e65b7569fdce0eaea36494670bec8cc2e074a6 100644 (file)
@@ -6,7 +6,8 @@ import subprocess
 
 stylesheets = [
     'data/theme/gnome-shell-high-contrast.css',
-    'data/theme/gnome-shell.css'
+    'data/theme/gnome-shell-dark.css',
+    'data/theme/gnome-shell-light.css'
 ]
 
 sourceroot = os.environ.get('MESON_SOURCE_ROOT')